/* 
 * Copyright TLR Team, Inc. All Rights Reserved.
 */

TLR.services.factory('HIKESrv', function ($resource) {
    return $resource("device/rest/hike/:action", {
        action: '@action'
    }, {
        switchinfo: {method: "GET", params: {action: 'switch'}, isArray: false},
        wind: {method: "GET", params: {action: 'wind'}, isArray: false},
        mode: {method: "GET", params: {action: 'mode'}, isArray: false},
        ion: {method: "GET", params: {action: 'ion'}, isArray: false},
        service_address: {method: "GET", params: {action: 'hikeservice'}, isArray: false},
        data: {method: "GET", params: {action: 'hike_data'}, isArray: false},
        all_data: {method: "GET", params: {action: 'all_hike_data'}, isArray: false},
        state: {method: "GET", params: {action: 'hike_status'}, isArray: false}
    });
}).factory('AirPurifier', function ($resource) {
    return $resource("device/rest/air_purifier/:action", {
        action: '@action'
    }, {
        binded: {method: "GET", params: {action: 'binded'}, isArray: false},
        add_bind: {method: "POST", params: {action: 'add_bind'}, isArray: false},
        edit_bind: {method: "POST", params: {action: 'edit_bind'}, isArray: false},
        update_position: {method: "POST", params: {action: 'update_position'}, isArray: false}
    });
});

